Skip to content

Fix interface resolution for components exporting interface instances#173

Closed
avrabe wants to merge 1 commit intobytecodealliance:mainfrom
avrabe:interface-resolution-fix
Closed

Fix interface resolution for components exporting interface instances#173
avrabe wants to merge 1 commit intobytecodealliance:mainfrom
avrabe:interface-resolution-fix

Conversation

@avrabe
Copy link
Copy Markdown

@avrabe avrabe commented Aug 17, 2025

Resolves composition failures when source components export interface instances but target components expect individual function imports.

Problem: WAC failed to compose components when source exports interface instances containing functions, but target expects those functions as direct exports, resulting in "instance is missing expected function export" errors.

Solution: Enhanced instance_exports() method in subtype checker to search inside interface instances for missing exports when direct lookup fails.

Testing: Verified with existing WAC test suite - all 125 resolution tests pass, including existing failure cases.

Fixes #172

Resolves composition failures when source components export interface instances
but target components expect individual function imports. Enhanced the
instance_exports() method to search inside interface instances for missing
function exports when direct lookup fails.

Fixes: bytecodealliance#172
@avrabe
Copy link
Copy Markdown
Author

avrabe commented Aug 21, 2025

Closing this PR as the issue was determined to be in my component generation tooling, not a WAC bug. WAC is working correctly as designed. See issue #172 for full details.

@avrabe avrabe closed this Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interface resolution bug: Missing function exports when component exports interface instances

1 participant